<script setup>
import { ref } from 'vue'

import FileCreateDialog from '@/components/FileCreateDialog.vue'
import FileUploadDialog from '@/components/FileUploadDialog.vue'

const createDialogVisible = ref(false)
const uploadDialogVisible = ref(false)
</script>

<template>
  <el-card class="welcome-card">
    <h2>欢迎使用语雀文档</h2>
    <p>一个高效、简洁的文档协作平台，支持在线编辑、多标签分类、文档管理。</p>
    <el-button type="primary" icon="Plus" @click="createDialogVisible = true">新建文档</el-button>
    <el-button icon="Upload" @click="uploadDialogVisible = true">上传文档</el-button>
  </el-card>

  <FileCreateDialog v-model="createDialogVisible" />
  <FileUploadDialog v-model="uploadDialogVisible" />
</template>
